package com.ruoyi.safety.service.impl;

import java.util.ArrayList;
import java.util.List;
import java.util.Objects;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; //添加
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.safety.mapper.SafetySubstationRealTimeMapper;
import com.ruoyi.safety.domain.SafetySubstationRealTime;
import com.ruoyi.safety.service.ISafetySubstationRealTimeService;

/**
 * 分站实时信息数据Service业务层处理
 *
 * @author ruoyi
 * @date 2024-10-30
 */
@Service
public class SafetySubstationRealTimeServiceImpl extends ServiceImpl<SafetySubstationRealTimeMapper, SafetySubstationRealTime> implements ISafetySubstationRealTimeService //修改
{
    @Autowired
    private SafetySubstationRealTimeMapper safetySubstationRealTimeMapper;

    /**
     * 查询分站实时信息数据
     *
     * @param substationCode 分站实时信息数据主键
     * @return 分站实时信息数据
     */
    @Override
    public SafetySubstationRealTime selectSafetySubstationRealTimeBySubstationCode(String substationCode)
    {
        SafetySubstationRealTime substationRealTime = safetySubstationRealTimeMapper.selectSafetySubstationRealTimeBySubstationCode(substationCode);

//


//        return safetySubstationRealTimeMapper.selectSafetySubstationRealTimeBySubstationCode(substationCode);
        return substationRealTime;
    }

    /**
     * 查询分站实时信息数据列表
     *
     * @param safetySubstationRealTime 分站实时信息数据
     * @return 分站实时信息数据
     */
    @Override
    public List<SafetySubstationRealTime> selectSafetySubstationRealTimeList(SafetySubstationRealTime safetySubstationRealTime)
    {
        return safetySubstationRealTimeMapper.selectSafetySubstationRealTimeList(safetySubstationRealTime);
    }

    /**
     * 新增分站实时信息数据
     *
     * @param safetySubstationRealTime 分站实时信息数据
     * @return 结果
     */
    @Override
    public int insertSafetySubstationRealTime(SafetySubstationRealTime safetySubstationRealTime)
    {
        return safetySubstationRealTimeMapper.insertSafetySubstationRealTime(safetySubstationRealTime);
    }

    /**
     * 修改分站实时信息数据
     *
     * @param safetySubstationRealTime 分站实时信息数据
     * @return 结果
     */
    @Override
    public int updateSafetySubstationRealTime(SafetySubstationRealTime safetySubstationRealTime)
    {

        return safetySubstationRealTimeMapper.updateSafetySubstationRealTime(safetySubstationRealTime);
    }

    /**
     * 批量删除分站实时信息数据
     *
     * @param substationCodes 需要删除的分站实时信息数据主键
     * @return 结果
     */
    @Override
    public int deleteSafetySubstationRealTimeBySubstationCodes(String[] substationCodes)
    {
        return safetySubstationRealTimeMapper.deleteSafetySubstationRealTimeBySubstationCodes(substationCodes);
    }

    /**
     * 删除分站实时信息数据信息
     *
     * @param substationCode 分站实时信息数据主键
     * @return 结果
     */
    @Override
    public int deleteSafetySubstationRealTimeBySubstationCode(String substationCode)
    {
        return safetySubstationRealTimeMapper.deleteSafetySubstationRealTimeBySubstationCode(substationCode);
    }

    @Override
    public void insertDataBatch(ArrayList<SafetySubstationRealTime> substationRealTimeArrayList) {
        safetySubstationRealTimeMapper.insertDataBatch(substationRealTimeArrayList);
        return ;
    }

    @Override
    public void updateDataBatch(ArrayList<SafetySubstationRealTime> substationRealTimeArrayList) {
        safetySubstationRealTimeMapper.updateDataBatch(substationRealTimeArrayList);
        return ;
    }
}
